//测试用模块主页
import React, { PropTypes ,PureComponent} from 'react';
//加载内容组件
//加载模块样式
import {testStyle} from '../../../styles'
import AsyncStorageUtil from '../../util/AsyncStorageUtil'

import {
  Text,
  View,
  StyleSheet
} from 'react-native';


//示例菜单
export default class Test extends PureComponent {
    
    constructor (props) {
        super(props)
    }
    
    
    render() {
        return (
            <View style={testStyle.container}>
                <Text onPress={()=>{this.goTo('TestList')}}>ListView</Text>
                {/* <TestList navigation = {this.props.navigation}/> */}
                <Text onPress={()=>{this.goTo('SimpleSelectCity')}}>SimpleSelectCity</Text>
                <Text onPress={()=>{this.goTo('TestTime')}}>TestTime</Text>
                <Text style={styles.aa} onPress={()=>{this.goTo('TestMap')}}>TestMap</Text>
                <Text style={styles.aa} onPress={()=>{this.goTo('TestImg')}}>TestImg</Text>
                <Text onPress={()=>{this.goTo('AnimatedTest')}}>AnimatedTest</Text>
                <Text onPress={()=>{
                    this.goTo('cityList')
                }}>city</Text>
                <Text onPress={()=>{
                    AsyncStorageUtil.delete("lastCity")
                }}>city</Text>
            </View>
        )
    }

    goTo(name){
        this.props.navigation.navigate(name,{nowCity:"北京市",callback:this.callback});
    }
    
    callback(ret){
        //console.log("回调====》"+ret)
    }
}


const styles = StyleSheet.create({
    aa: {
      fontFamily:'msyh',
      fontWeight:'bold'
    }
  });
  